package clases;

import java.util.Collection;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;


@Entity
@Table(name="FACTURAS")
public class Factura {
	private Cliente cliente;
	private int nroFactura;
	private Date fechaFactura;
	private Collection <ItemFactura> itemsFactura;
	private float montoFactura;
	private String condIva;
	private String condIngBrutos;
	
	@OneToOne
	public Cliente getCliente() {return cliente;}
	public void setCliente(Cliente cliente) {this.cliente = cliente;}
	
	@Column(name="NUMERO")
	public int getNroFactura() {return nroFactura;}
	public void setNroFactura(int nroFactura) {this.nroFactura = nroFactura;}
	
	@Column(name="FECHA")
	public Date getFechaFactura() {return fechaFactura;}
	public void setFechaFactura(Date fechaFactura) {this.fechaFactura = fechaFactura;}
	
	@OneToMany
	public Collection<ItemFactura> getItemsFactura() {return itemsFactura;}
	public void setItemsFactura(Collection<ItemFactura> itemsFactura) {this.itemsFactura = itemsFactura;}
	
	@Column(name="MONTO")
	public float getMontoFactura() {return montoFactura;}
	public void setMontoFactura(float montoFactura) {this.montoFactura = montoFactura;}
	
	@Column(name="CONDIVA")
	public String getCondIva() {return condIva;}
	public void setCondIva(String condIva) {this.condIva = condIva;}
	
	@Column(name="CONDINGBRUTOS")
	public String getCondIngBrutos() {return condIngBrutos;}
	public void setCondIngBrutos(String condIngBrutos) {this.condIngBrutos = condIngBrutos;}	
}
